package com.zzw.springboot.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

/**
 * 库存实体类
 */
@TableName("t_inventory")
public class Inventory implements Serializable {
    // 库存ID
    @TableId(value = "inventory_id", type = IdType.AUTO)
    private Integer inventoryId;

    // 商品ID
    private Integer productId;

    // 仓库ID
    private Integer warehouseId;

    // 库存数量
    private Integer quantity;

    // 可用数量
    private Integer availableQuantity;

    // 锁定数量
    private Integer lockedQuantity;

    // 预警阈值
    private Integer alertThreshold;

    // 最后盘点时间
    private Date lastCheckTime;

    // 备注
    private String remark;

    // 创建时间
    private Date createTime;

    // 更新时间
    private Date updateTime;

    // 非数据库字段
    // 商品名称
    @TableField(exist = false)
    private String productName;

    // 商品编码
    @TableField(exist = false)
    private String productCode;

    // 规格
    @TableField(exist = false)
    private String specification;

    // 单位
    @TableField(exist = false)
    private String unit;

    // 仓库名称
    @TableField(exist = false)
    private String warehouseName;

    public Integer getInventoryId() {
        return inventoryId;
    }

    public void setInventoryId(Integer inventoryId) {
        this.inventoryId = inventoryId;
    }

    public Integer getProductId() {
        return productId;
    }

    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    public Integer getWarehouseId() {
        return warehouseId;
    }

    public void setWarehouseId(Integer warehouseId) {
        this.warehouseId = warehouseId;
    }

    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    public Integer getAvailableQuantity() {
        return availableQuantity;
    }

    public void setAvailableQuantity(Integer availableQuantity) {
        this.availableQuantity = availableQuantity;
    }

    public Integer getLockedQuantity() {
        return lockedQuantity;
    }

    public void setLockedQuantity(Integer lockedQuantity) {
        this.lockedQuantity = lockedQuantity;
    }

    public Integer getAlertThreshold() {
        return alertThreshold;
    }

    public void setAlertThreshold(Integer alertThreshold) {
        this.alertThreshold = alertThreshold;
    }

    public Date getLastCheckTime() {
        return lastCheckTime;
    }

    public void setLastCheckTime(Date lastCheckTime) {
        this.lastCheckTime = lastCheckTime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getProductCode() {
        return productCode;
    }

    public void setProductCode(String productCode) {
        this.productCode = productCode;
    }

    public String getSpecification() {
        return specification;
    }

    public void setSpecification(String specification) {
        this.specification = specification;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public String getWarehouseName() {
        return warehouseName;
    }

    public void setWarehouseName(String warehouseName) {
        this.warehouseName = warehouseName;
    }

    @Override
    public String toString() {
        return "Inventory{" +
                "inventoryId=" + inventoryId +
                ", productId=" + productId +
                ", warehouseId=" + warehouseId +
                ", quantity=" + quantity +
                ", availableQuantity=" + availableQuantity +
                ", lockedQuantity=" + lockedQuantity +
                ", alertThreshold=" + alertThreshold +
                ", lastCheckTime=" + lastCheckTime +
                ", remark='" + remark + '\'' +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", productName='" + productName + '\'' +
                ", productCode='" + productCode + '\'' +
                ", specification='" + specification + '\'' +
                ", unit='" + unit + '\'' +
                ", warehouseName='" + warehouseName + '\'' +
                '}';
    }
}
